﻿@model BBSSite.Areas.Admins.ViewModels.AddColumnEntity
@{
    ViewBag.Title = "添加栏目";
    MyPublic.IGettingUrl Urls = ViewBag.Urls as MyPublic.IGettingUrl;
}@section link{
    <link rel="stylesheet" href="@Urls.ContentCssUrl/admins/Public.css" />
}
@using (Html.BeginForm("DoCreateColumn", "Column", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <div class="container toppx1">
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目级别</span>&nbsp;&nbsp;&nbsp;
                    <input type="radio" value="1" name="ColumnGrade" onclick="onColumnGrade(1)"/> 一级 &nbsp;
                    <input type="radio" value="2" name="ColumnGrade" onclick="onColumnGrade(2)" checked="checked"/> 二级 &nbsp;
                    <select name="ChooseParentColumn" id="ColumnGrade">
                        @{
                            IList<BBSSite.Models.tb_Column> Columns = ViewBag.Columns;
                            foreach (var Column in Columns)
                            {
                                @:<option value="@Column.ColumnCode">@Column.ColumnName</option>
                            }
                        }
                    </select>
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.ColumnName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目名称</span>
                    @Html.TextBoxFor(TB => TB.ColumnName, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.ColumnName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目地址</span>
                    @Html.TextBoxFor(TB => TB.Url, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.Url)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-3"></div>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">栏目图标</span>
                    @Html.TextBoxFor(TB => TB.LogoClassName, new { @class = "form-control" })
                    <span class="input-group-addon mymsg">@Html.ValidationMessageFor(model => model.LogoClassName)</span>
                </div>
            </div>
            <div class="col-md-3"></div>
        </div>
        <br />
        <div class="row">
            <div class="col-md-12 text-center">
                <input type="submit" name="sublogin" class="OnLogin" value="创建" />
                &nbsp;@Html.ValidationMessage("ColumnError", new { style = "color:Red" })
            </div>
        </div>
    </div>
}
<script type="text/javascript" src="@Urls.ContentJSUrl/Column.js"></script>